import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { Users } from '@src/common/entities/users.entity';

@Injectable()
export class UsersService {

   constructor(
      @InjectRepository(Users)
      private readonly Repository: Repository<Users>,
   ) {

   }


   async findOne(username: string): Promise<Users | undefined> {
      return await this.Repository.findOne({
         where: { username: username },
         cache: false
      });
   }
}
